import java.io.File;

public class Demo7 {
    public static void main(String[] args) {
        File source = new File("d:/zzz/test1.txt");
        File dest = new File("d:/test.txt");
        // 重命名
        source.renameTo(dest);

    }
}
